import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/mms/v1/teacher/list',
    method: 'get',
    params: query
  })
}

export function saveTeacher(data) {
  return request({
    url: '/mms/v1/teacher/save',
    method: 'post',
    data
  })
}
export function deleteTeacher(data) {
  return request({
    url: '/mms/v1/teacher/delete',
    method: 'post',
    data
  })
}

export function saveSchedule(data) {
  return request({
    url: '/mms/v1/teacher/schedule/save',
    method: 'post',
    data
  })
}

export function getScheduleList(params) {
  return request({
    url: '/mms/v1/teacher/schedule/list',
    method: 'get',
    params
  })
}

export function getTeacherDetail(data) {
  return request({
    url: `/mms/v1/teacher/teacher/${data.id}`,
    method: 'get'
  })
}
